# from string import Template

# 使用符号 %
print('我叫 %s,今年 %d 岁啦!' % ('小牧', 10))

# 使用str.format()
print('我叫{name},今年{age}岁啦!'.format(name="Kim", age="15"))

# 使用f-strings
site = {'name': 'baidu', 'url': 'www.baidu.com'}

print(f'{site["name"]}:{site["url"]}')


STR = "哪有人喜欢孤独,不过是不喜欢失望罢了"

STR_UTF8 = str.encode("UTF-8")
str_gbk = str.encode("GBK")

print(str)
print("UTF-8编码:", STR_UTF8)
print("GBK编码:", str_gbk)

print("UTF-8解码:", STR_UTF8.decode("UTF-8", "strict"))
print("GBK解码:", str_gbk.decode("GBK", 'strict'))


list_ = ['Google', 'Runoob', 1997, 2000]
del list_[2]
print(list_)

print(id(list_))
